package spec.ganlijuan.zuoye_qiu_2;

public class Ball_1 {
    //成员属性
    String qiuname;//姓名
    String qiumax;//直径
    String qiuzhicai;//制材
    float qiuzhongliang;//重量
    String qiushihe;//适合人群

    static String tc;
    static String shape;

    //成员方法
   /* //方法结构    1 .返回值类型；2. 方法名；3. 参数列表；4.方法体；*/
    String name() {
        String s = "我是：" + qiuname + "\n" + "我的重量是：" + qiuzhongliang + "千克" + "\n" + "做成的材料是:" + qiuzhicai + "\n" + "适合人群："
                + qiushihe + "\n" + "直径：" + qiumax + "\n" + "填充：" + tc + "\n" + "形状：" + shape;
        return s;
    }

    public String getQiuzhicai() {
        return qiuzhicai;
    }

    public void setQiuzhicai(String qiuzhicai) {
        this.qiuzhicai = qiuzhicai;
    }

    public float getQiuzhongliang() {
        return qiuzhongliang;
    }

    public void setQiuzhongliang(float qiuzhongliang) {
        this.qiuzhongliang = qiuzhongliang;
    }

    public String getQiushihe() {
        return qiushihe;
    }

    public void setQiushihe(String qiushihe) {
        this.qiushihe = qiushihe;
    }

    public String getQiuname() {
        return qiuname;
    }

    public void setQiuname(String qiuname) {
        this.qiuname = qiuname;
    }


    public String getQiumax() {
        return qiumax;
    }

    public void setQiumax(String qiumax) {
        this.qiumax = qiuname;
    }

    public String getTc() {
        return tc;
    }

    public void setTc(String tc) {
        this.tc = tc;
    }

    public String getShape() {
        return shape;
    }

    public void setShape(String shape) {
        this.shape = shape;
    }

    final void zuizhong() {
        this.tc = "空气 ";
        this.shape = "圆 ";
    }

    String play() {
        return "每天打会球，健康";
    }

    /*/  构造方法不能返回 不是void 2. 方法和类名一致 */
    Ball_1(String name, float zhongliang, String qiuzhicai, String qiushihe, String qiumax, String tc, String shape) {
        this.qiuname = name;
        this.qiuzhongliang = zhongliang;
        this.qiuzhicai = qiuzhicai;
        this.qiushihe = qiushihe;
        this.qiumax = qiumax;
        zuizhong();
    }
}
